#ifndef PROGRAM_H
#define PROGRAM_H

#include "Include.h"

namespace FunctionViewer {
	class Program {
		//friend class Main;
		friend class Namespace;
		friend class Class;
		friend class ClassContent;

		friend class Save;
		friend class Load;

		//variables.
		private:
		Namespace *first_namespace, *last_namespace, *current_namespace;
		unsigned long namespace_counter;

		char* name;
		
		public:
		//Constructor and destructor.
		Program();
		~Program();

		//Destory everything in this program.
		void Clear();

		//Create a new namespace.
		Namespace* CreateNamespace(char* name);

		//Destroy a namespace (and everything inside that namespace).
		bool DestoryNamespace(Namespace* v_namespace);

		//Print program structure to console window.
		void PrintProgramStructure();

		//Gives the program a name.
		void SetName(char* v_name);

		//Save a program to a file.
		void SaveFile(char* filename);
	};
}

#endif //PROGRAM_H